home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / falclib5.lzh / ROUTS / SHRTONES.S < prev    next >
Text File  |  1994-10-01  |  1KB  |  76 lines

  1. *
  2. * SHRTONES.S
  3. *
  4. *    @super
  5. *     enter supervisor mode  gemdos($20)
  6. *
  7. *    @user
  8. *     returns to user mode  gemdos($20)
  9. *
  10. *    @waitvbl
  11. *     waits for a vertical blank  xbios(#37)
  12. *
  13. *    @waitkey
  14. *     waits for a keypress, no echo  gemdos(#7)
  15. * Out     d0.b=ascii value
  16. *
  17. *    @exitifkey
  18. *     quits if a key has been pressed
  19. *     gemdos(#11), gemdos(#7)
  20. *
  21. *    @quit
  22. *     terminate process  gemdos(#0)
  23. *
  24. *    @print
  25. *     prints a string on the screen.  gemdos(#9)
  26. * In     a0.l=address to a null terminated ascii string
  27. *
  28.  
  29.  
  30. @print    move.l    a0,-(sp)
  31.     move    #$9,-(sp)
  32.     trap    #1
  33.     addq.l    #6,sp
  34.     rts
  35.  
  36. @super    clr.l    -(sp)
  37.     move    #$20,-(sp)
  38.     trap    #1
  39.     addq.l    #6,sp
  40.     move.l    d0,savedsp0673
  41.     rts
  42. savedsp0673
  43.     ds.l    1
  44.  
  45. @user    move.l    savedsp0673,-(sp)
  46.     move    #$20,-(sp)
  47.     trap    #1
  48.     addq.l    #6,sp
  49.     rts
  50.  
  51. @waitvbl
  52.     move    #37,-(sp)
  53.     trap    #14
  54.     addq.l    #2,sp
  55.     rts
  56.  
  57. @waitkey
  58.     move    #7,-(sp)
  59.     trap    #1
  60.     addq.l    #2,sp
  61.     rts
  62.  
  63. @exitifkey
  64.     move    #11,-(sp)
  65.     trap    #1
  66.     addq.l    #2,sp
  67.     tst.l    d0
  68.     blt    .ut
  69.     rts
  70. .ut    bsr    @waitkey
  71.     move.l    #@quit,(sp)
  72.     rts
  73.  
  74. @quit    clr    -(sp)
  75.     trap    #1
  76.